<%-- 
    Document   : RequestPage
    Created on : 10.03.2013, 1:50:12
    Author     : Obuhov D.G.
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Заявки</title>
        <style>
            .error {
                color: red; /* Цвет символа */
                font-size: 200%; /* Размер шрифта */
            } 
            .result {
                color: crimson; /* Цвет символа */
                font-size: 200%; /* Размер шрифта */
            } 
        </style>
    </head>
    <body>
        <h1>Заявки</h1>
        <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="core" %>

        <form name="fRequest" method="POST" action="/DExchange/Controller"> 

            <table>
                <thead>
                    <tr>
                        <td></td>	
                        <td>id</td>	
                        <td>сумма</td>
                        <td>валюта 1</td>
                        <td>валюта 2</td>
                        <td>Дата заявки</td>
                    </tr>
                </thead>
                <core:forEach items="${reqestList}" var="req">
                    <tr>
                        <td><input type="radio" name="selectedRequest" value =${req.id} > </td>
                        <td>${req.id}</td>	
                        <td>${req.amountFrom}</td>
                        <td>${req.currencyFromId}</td>
                        <td>${req.currencyToId}</td>
                        <td>${req.createDate}</td>
                    </tr>
                </core:forEach>
            </table>

            <div class ="error">     
                <jsp:expression>(request.getAttribute("errorMessage") != null) ? (String) request.getAttribute("errorMessage") : ""</jsp:expression>   
            </div>    
            <div class ="result"> 
                <jsp:expression>(request.getAttribute("update_confirm") != null) ? (String) request.getAttribute("update_confirm") : ""</jsp:expression>   
            </div>

            <input type="hidden" name="command" value ="cmdRequestClose"/>
            <input type ="submit" value="Close"/>
        </form>     

        <%--  <form name="fCloseRequest" method="POST" action="Controller">
              <input type="hidden" name="command" value ="cmdRequestClose"/>
              <input type ="submit" value="Close"/>
          </form>  
        --%>

        <%@ include file="navbar.jsp" %>   
        <%@ include file="debugInfo.jsp" %>
    </body>
</html>
